package demo_Serializable;

import java.io.File;
import java.io.IOException;

import org.junit.Test;


public class Basic_test {
	
	public File buildFile() throws IOException{
		String str = "test.txt";
		File file = new File(str);
		file.createNewFile();
		return file;
	}
	public void test() throws IOException{
		File file = buildFile();
		Point p1 = new Point(1D,2D,3D);
		Point p2 = new Point(4D,5D,6D);
		Basic.writeObjFile(file,p1);
		Basic.writeObjFile(file,p2);
	}
	@Test
	public void readPoint() throws Exception{
		String str = "test.txt";
		Point p = Basic.readObjFile(str);
		System.out.println(p);
		p = Basic.readObjFile(str);
		System.out.println(p);
	}
	
}
